#pragma once
#include<iostream>
#include <opencv2/opencv.hpp>
#include"Process.hpp"
#include <chrono>
#include <thread>
#include <deque>
#include<MvCameraControl.h>
#include"Draw_Contours.hpp"


class CameraSetting {

private:
    std::deque<std::chrono::time_point<std::chrono::high_resolution_clock>> frameTimes;
    const int frameTimeBufferSize = 10; // 用于计算FPS的帧数 取最近10帧

public:
    // 海康相机API
    void import_image();

    float calculateFPS();

    void displayFPS(cv::Mat& image, float fps);

    void setupCamera(void * handle);
};

